home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / gnu / groff108.lha / groff-1.08 / include / lib.h < prev    next >
C/C++ Source or Header  |  1993-03-29  |  3KB  |  106 lines

  1. // -*- C++ -*-
  2. /* Copyright (C) 1989, 1990, 1991, 1992 Free Software Foundation, Inc.
  3.      Written by James Clark (jjc@jclark.com)
  4.  
  5. This file is part of groff.
  6.  
  7. groff is free software; you can redistribute it and/or modify it under
  8. the terms of the GNU General Public License as published by the Free
  9. Software Foundation; either version 2, or (at your option) any later
  10. version.
  11.  
  12. groff is distributed in the hope that it will be useful, but WITHOUT ANY
  13. WARRANTY; without even the implied warranty of MERCHANTABILITY or
  14. FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  15. for more details.
  16.  
  17. You should have received a copy of the GNU General Public License along
  18. with groff; see the file COPYING.  If not, write to the Free Software
  19. Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
  20.  
  21. extern "C" {
  22.   char *strerror(int);
  23. #ifndef __BORLANDC__
  24.   const char *itoa(int);
  25.   const char *iftoa(int, int);
  26. #endif /* __BORLANDC__ */
  27. };
  28.  
  29. #ifdef STDLIB_H_DECLARES_GETOPT
  30. #include <stdlib.h>
  31. #else /* not STDLIB_H_DECLARES_GETOPT */
  32. #ifdef UNISTD_H_DECLARES_GETOPT
  33. #include <sys/types.h>
  34. #include <unistd.h>
  35. #else /* not UNISTD_H_DECLARES_GETOPT */
  36. extern "C" {
  37.   int getopt(int, char **, const char *);
  38. }
  39. #endif /* not UNISTD_H_DECLARES_GETOPT */
  40.  
  41. extern "C" {
  42.   extern char *optarg;
  43.   extern int optind;
  44.   extern int opterr;
  45. }
  46.  
  47. #endif /* not STDLIB_H_DECLARES_GETOPT */
  48.  
  49. char *strsave(const char *s);
  50. int is_prime(unsigned);
  51.  
  52. #include <stdio.h>
  53.  
  54. FILE *xtmpfile();
  55.  
  56. int interpret_lf_args(const char *p);
  57.  
  58. extern char illegal_char_table[];
  59.  
  60. inline int illegal_input_char(int c)
  61. {
  62.   return c >= 0 && illegal_char_table[c];
  63. }
  64.  
  65. #ifdef HAVE_CC_LIMITS_H
  66. #include <limits.h>
  67. #else /* not HAVE_CC_LIMITS_H */
  68. #define INT_MAX 2147483647
  69. #endif /* not HAVE_CC_LIMITS_H */
  70.  
  71. /* It's not safe to rely on people getting INT_MIN right (ie signed). */
  72.  
  73. #ifdef INT_MIN
  74. #undef INT_MIN
  75. #endif
  76.  
  77. #ifdef CFRONT_ANSI_BUG
  78.  
  79. /* This works around a bug in cfront 2.0 used with ANSI C compilers. */
  80.  
  81. #define INT_MIN ((long)(-INT_MAX-1))
  82.  
  83. #else /* not CFRONT_ANSI_BUG */
  84.  
  85. #define INT_MIN (-INT_MAX-1)
  86.  
  87. #endif /* not CFRONT_ANSI_BUG */
  88.  
  89. /* Maximum number of digits in the decimal representation of an int
  90. (not including the -). */
  91.  
  92. #define INT_DIGITS 10
  93.  
  94. /* ad_delete deletes an array of objects with destructors;
  95. a_delete deletes an array of objects without destructors */
  96.  
  97. #ifdef ARRAY_DELETE_NEEDS_SIZE
  98. /* for 2.0 systems */
  99. #define ad_delete(size) delete [size]
  100. #define a_delete delete
  101. #else /* not ARRAY_DELETE_NEEDS_SIZE */
  102. /* for ARM systems */
  103. #define ad_delete(size) delete []
  104. #define a_delete delete []
  105. #endif /* not ARRAY_DELETE_NEEDS_SIZE */
  106.